<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
        // function fn () {
        //     console.log(123)
        // }

        // *函数
        function * fn() {
            // yield  暂停
            yield 123456
            yield 7890

            return 888888888
        }

        let mFn = fn()
        console.log(mFn.next())
        console.log(mFn.next())
        console.log(mFn.next())
        // mFn.next()


        // async function fn() {
        //     await console.log('异步')
        //     console.log('同步')
        // }
    </script>
</body>
</html>